#include<iostream>
using namespace std;


int main(){
	int min=0x7fffffff;
	int max=0;
	int score[9];
	int sum=0;
	cout<<"input 9 scores:"<<endl;
	for(int i=0;i<9;i++){
		cin>>score[i];
		if(score[i]<min) min=score[i];
		if(score[i]>max) max=score[i];
		sum+=score[i];
	}
	sum-=min;
	sum-=max;
	cout<<"average:"<<sum/7.0<<endl;
	return 0;
}